<?php

/**
 * @author christian
 * @copyright 2011
 */

//echo "registrar ....";
//echo getcwd();
//echo basename(getcwd());
$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDGuide";
$ruta2=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";

include_once("$ruta/conf/CConfig.php");
include_once("$ruta/elements/head.tpl");
include_once("$ruta/MDGuideData/MDAB/CPaxEditDraw.php");
include_once("$ruta/MDGuideData/MDAB/AbTableDraw.php");
include_once("$ruta/view/CDrawMenuTour.php");
include_once("$ruta/MDGuideData/CTourEditDraw.php");
include_once("$ruta2/MDTourGeneral/CDrawPageReg.php");
include_once("$ruta/star.php");


$id=$_GET['codigo'];
$idGuide=$_GET['idg'];
$work=$_GET['action']; // 0 si es nuevo pasajero, 1 si es editar

$act_tab = new AbTableDraw;
$menu = new CDrawMenuTour;
$edit = new CTourEditDraw;
$registro = new CPaxEditDraw;
$reg_simple = new CDrawPageReg;


$items= array("Pagos y bonos"=>"MDPayBonus/BonusTour.php?codigo=$id","Tours del guia"=>"/viventura/MDGuide/MDGuideData/CGuideTable.php?codigo=$idGuide&default=1","Ver TC's"=>"/viventura/MDGuide");
$menu->setMenu($items);
$menu->rigth_side_begin();//empieza lado derecho

 
$menu->DrawDivAdBegin("content_area_user_title","1");echo "<h1>Destino Sur</h1>";

    $action="AbRegistro.php";$name="formulario_registro";$method="post";$NAME="REGISTRO";
    $registro->DrawHead($action,$name,$method,$NAME);
    $campos = array("actividades_idAct"=>"idAct","NomAct"=>"NomAct"); 
    $dias = $act_tab->DrawDays($id);
    $act_tab->DrawSelectDays($dias,"Día");
    $reg_simple->DrawSelect("actividades", $campos, "Actividad","idAct");
    $precios = array ("GasPre"=>"Costo Presupuestado","GasReal"=>"Gasto Real", "ActItems"=>"Unidades de act.");
    $val_precios= array (":required","","required");
    $reg_simple->DrawTextBox($precios,$val_precios);
    $reg_simple->HiddenValue($id,"idPackTourGui");
    $registro->DrawSubmmit("Añadir");

$menu->DrawDivAdEnd();


$actividades=array("idActGuiTour"=>"Actividad","DayAct"=>"Dia","NomAct"=>"Actividad","GasPre"=>"Presupuestado","GasReal"=>"Gasto real","ActItems"=>"Cantidad");
$act_tab->DrawTable("Actividades","guidetc_has_actividades",$actividades,$id);

?>
